﻿@model MvcAtletIS.Models.Webcontacts

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Webcontacts</legend>

        @Html.HiddenFor(model => model.CategoryId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Order)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Order)
            @Html.ValidationMessageFor(model => model.Order)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Firstname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Firstname)
            @Html.ValidationMessageFor(model => model.Firstname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Surname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Surname)
            @Html.ValidationMessageFor(model => model.Surname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Position)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Position)
            @Html.ValidationMessageFor(model => model.Position)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.City)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.City)
            @Html.ValidationMessageFor(model => model.City)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Adress)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Adress)
            @Html.ValidationMessageFor(model => model.Adress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Phone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Phone)
            @Html.ValidationMessageFor(model => model.Phone)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Other)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Other)
            @Html.ValidationMessageFor(model => model.Other)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ImagePath)
        </div>
        <div class="editor-field">
            @Html.DropDownList("ImagePath")
            @Html.ValidationMessageFor(model => model.ImagePath)
        </div>

        <p>
            Obrázok uložte do zložky [../Content/contacts]
        </p>

        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na prehľad kontaktov", "Index", new { CategoryId = Model.CategoryId })
</div>
